  <?php 
  
  	$BLOGName =$generalsettings['BLOGName'];
	$BLOGTitle =$generalsettings['BLOGTitle'];
	$BLOGMaintainedBy =$generalsettings['BLOGMaintainedBy'];
	$UploadFileSize =$generalsettings['UploadFileSize'];
	
	if($generalsettings['GuestView']) 	
		$GuestView ="checked=\"checked\" ";
	else  
		$GuestView =" ";
	
	if($generalsettings['EnableMORE']) 	
		$EnableMORE ="checked=\"checked\" ";
	else  
		$EnableMORE =" ";
		
	if($generalsettings['ShowRecentComments']) 	
		$ShowRecentComments ="checked=\"checked\" ";
	else  
		$ShowRecentComments =" ";
	
	if($generalsettings['ShowRecentPosts']) 	
		$ShowRecentPosts ="checked=\"checked\" ";
	else  
		$ShowRecentPosts =" ";
	
	if($generalsettings['ShowCalendar']) 	
		$ShowCalendar ="checked=\"checked\" ";
	else  
		$ShowCalendar =" ";
	
	if($generalsettings['ShowOnlineMembers']) 	
		$ShowOnlineMembers ="checked=\"checked\" ";
	else  
		$ShowOnlineMembers =" ";
		
	if($generalsettings['ShowOnlineGuests']) 	
		$ShowOnlineGuests ="checked=\"checked\" ";
	else  
		$ShowOnlineGuests =" ";
	
	if($generalsettings['ShowOnlineMemberNames']) 	
		$ShowOnlineMemberNames ="checked=\"checked\" ";
	else  
		$ShowOnlineMemberNames =" ";
		
	if($generalsettings['EnableCommentNotification']) 	
		$EnableCommentNotification ="checked=\"checked\" ";
	else  
		$EnableCommentNotification =" ";
		
	if($generalsettings['EnablePostScheduling']) 	
		$EnablePostScheduling ="checked=\"checked\" ";
	else  
		$EnablePostScheduling =" ";
		
	if($generalsettings['EnableUploadingFiles']) 	
		$EnableUploadingFiles ="checked=\"checked\" ";
	else  
		$EnableUploadingFiles =" ";
	
	if($generalsettings['EnableComments']) 	
		$EnableComments ="checked=\"checked\" ";
	else  
		$EnableComments =" ";
		
	if($generalsettings['EnablePlugins']) 	
		$EnablePlugins ="checked=\"checked\" ";
	else  
		$EnablePlugins =" ";
		
	if($generalsettings['EnableRegistration']) 	
		$EnableRegistration ="checked=\"checked\" ";
	else  
		$EnableRegistration =" ";
		
		if($generalsettings['EnableGuestComment']) 	
		$EnableGuestComment ="checked=\"checked\" ";
	else  
		$EnableGuestComment =" ";
		
	if($generalsettings['SendRegistrationMessage']) 	
		$SendRegistrationMessage ="checked=\"checked\" ";
	else  
		$SendRegistrationMessage =" ";	
	
  
	
$attributes = array('class' => 'advancedsettings', 'id' => 'generalsettings');
echo form_open('admin/GeneralSettings/', $attributes);
echo "<div class=\"error\" >".$this->validation->error_string."</div>";
//echo form_hidden('start', '1');
 ?>
<table width="100%" border="0">
<caption>General Settings</caption>
 
  <tr>
    <td width="32%">BLOG Name</td>
    <td width="68%"><input type="text" name="BLOGName" id="BLOGName" value="<?=$BLOGName?>" /></td>
  </tr>
  <tr>
    <td>BLOG Title</td>
    <td><input type="text" name="BLOGTitle" id="BLOGTitle" value="<?=$BLOGTitle?>" /></td>
  </tr>
  <tr>
    <td>BLOG Maintained By</td>
    <td><input type="text" name="BLOGMaintainedBy" id="BLOGMaintainedBy" value="<?=$BLOGMaintainedBy?>" /></td>
  </tr>
    <tr>
      <td>Can guest browse blog</td>
      <td><input type="checkbox"  name="GuestView" id="GuestView" value="1" <?=$GuestView?>/></td>
    </tr>
   
    <tr>
      <td>Show Recent Comments</td>
      <td><input type="checkbox" name="ShowRecentComments" id="ShowRecentComments" value="1" <?=$ShowRecentComments?>/></td>
    </tr>
    <tr>
      <td>Show Recent Posts</td>
      <td><input type="checkbox" name="ShowRecentPosts" id="ShowRecentPosts" value="1" <?=$ShowRecentPosts?>/></td>
    </tr>
    <tr>
      <td>Show Calendar</td>
      <td><input type="checkbox" name="ShowCalendar" id="ShowCalendar"  value="1" <?=$ShowCalendar?>/></td>
    </tr>
   
    <tr>
      <td>Enable Comments</td>
      <td><input type="checkbox" name="EnableComments" id="EnableComments" value="1" <?=$EnableComments?>/></td>
    </tr>
    
    <tr>
      <td>Enable Registration</td>
      <td><input type="checkbox" name="EnableRegistration" id="EnableRegistration" value="1" <?=$EnableRegistration?>/></td>
    </tr>
    <tr>
      <td>Enable Guest Comment</td>
      <td><input type="checkbox" name="EnableGuestComment" id="EnableGuestComment" value="1" <?=$EnableGuestComment?>/></td>
    </tr>
   
  <tr>
      <td>&nbsp;</td>
      <td><?=form_submit("save", "Save!")?>&nbsp;<?=form_reset("reset","Reset")?></td>
    </tr>
   
    <tfoot>
				<tr>
					<th scope=\"row\">&nbsp;</th>

					<td >&nbsp;</td>
				</tr>
			</tfoot>
  </table>
<?=form_close()?>
    
    <?php
	/*
	  <tr>
      <td>Send Registration Message</td>
      <td><input type="checkbox" name="SendRegistrationMessage" id="SendRegistrationMessage" value="1" <?=$SendRegistrationMessage?>/></td>
    </tr><tr>
      <td>Enable MORE tag</td>
      <td><input type="checkbox" name="EnableMORE" id="EnableMORE" value="1" <?=$EnableMORE?> /></td>
    </tr>
	<tr>
      <td>Enable Plugins</td>
      <td><input type="hidden" name="EnablePlugins" id="EnablePlugins" value="1" <?=$EnablePlugins?>/></td>
    </tr>
	<td>Show Online Members</td>
      <td><input type="hidden" name="ShowOnlineMembers" id="ShowOnlineMembers" value="1" <?=$ShowOnlineMembers?>/></td>
    </tr>
    <tr>
      <td>Show Online Guests</td>
      <td><input type="hidden" name="ShowOnlineGuests" id="ShowOnlineGuests" value="1" <?=$ShowOnlineGuests?>/></td>
    </tr>
    <tr>
      <td>Show Online Member Names</td>
      <td><input name="hidden" type="checkbox" id="ShowOnlineMemberNames" value="1" <?=$ShowOnlineMemberNames?>/></td>
    </tr>
    <tr>
      <td>Enable Comment Notification</td>
      <td><input type="hidden" name="EnableCommentNotification" id="EnableCommentNotification" value="1" <?=$EnableCommentNotification?>/></td>
    </tr>
    <tr>
      <td>Enable Post Scheduling</td>
      <td><input type="hidden" name="EnablePostScheduling" id="EnablePostScheduling" value="1" <?=$EnablePostScheduling?>/></td>
    </tr>
    <tr>
      <td>Enable Uploading Files</td>
      <td><input type="hidden" name="EnableUploadingFiles" id="EnableUploadingFiles" value="1" <?=$EnableUploadingFiles?>/></td>
    </tr>
    <tr>
      <td>Upload File Size</td>
      <td><input name="UploadFileSize" type="hidden" id="UploadFileSize" value="<?=$UploadFileSize?>" size="10" />      MB</td>
	  
	  
	  print_r($generalsettings);
	$BLOGName =$generalsettings['BLOGName'];
	$BLOGTitle =$generalsettings['BLOGTitle'];
	$BLOGMaintainedBy =$generalsettings['BLOGMaintainedBy'];
	$UploadFileSize =$generalsettings['UploadFileSize'];
	
	if($generalsettings['GuestView']) 	
//		$GuestView ="checked=\"checked\ ";
		$this->validation->set_checkbox('ShowCalendar', '1');  
	else  
		$GuestView =" ";
	
	$EnableMORE =$generalsettings['EnableMORE'];
	$ShowRecentComments =$generalsettings['ShowRecentComments'];
	$ShowRecentPosts =$generalsettings['ShowRecentPosts'];
	$ShowCalendar =$generalsettings['ShowCalendar']; 
	//$ShowCalendar =$this->validation->set_checkbox('ShowCalendar', '0'); 
	$ShowOnlineMembers =$generalsettings['ShowOnlineMembers']; 
	$ShowOnlineGuests =$generalsettings['ShowOnlineGuests'];
	$ShowOnlineMemberNames =$generalsettings['ShowOnlineMemberNames'];
	$EnableCommentNotification =$generalsettings['EnableCommentNotification']; 
	$EnablePostScheduling =$generalsettings['EnablePostScheduling'];
	$EnableUploadingFiles =$generalsettings['EnableUploadingFiles'];
	
	$EnableComments =$generalsettings['EnableComments'];
	$EnablePlugins =$generalsettings['EnablePlugins'];
	$EnableRegistration =$generalsettings['EnableRegistration'];
	$EnableGuestComment =$generalsettings['EnableGuestComment'];
	$SendRegistrationMessage =$generalsettings['SendRegistrationMessage'];
	
	if($generalsettings['GuestView']) 	
		$GuestView=$this->validation->set_checkbox('GuestView', '1'); 
	else  
		$GuestView=$this->validation->set_checkbox('GuestView', '0');
	
	/*if($generalsettings['EnableMORE'])
		$EnableMORE=$this->validation->set_checkbox('EnableMORE', '1'); 
	else
		$EnableMORE=$this->validation->set_checkbox('EnableMORE', '0');
	
	if($generalsettings['ShowRecentComments']==1)
		$ShowRecentComments=$this->validation->set_checkbox('ShowRecentComments', '1');
	else
		$ShowRecentComments=$this->validation->set_checkbox('ShowRecentComments', '0');

	if($generalsettings['ShowRecentPosts'])
		$ShowRecentPosts=$this->validation->set_checkbox('ShowRecentPosts', '1');
	else
		$ShowRecentPosts=$this->validation->set_checkbox('ShowRecentPosts', '0');
		
	if($generalsettings['ShowCalendar'])
		$ShowCalendar=$this->validation->set_checkbox('ShowCalendar', '1');
	else
		$ShowCalendar=$this->validation->set_checkbox('ShowCalendar', '0');
		
	if($generalsettings['ShowOnlineMembers'])
		$ShowOnlineMembers=$this->validation->set_checkbox('ShowOnlineMembers', '1');
	else
		$ShowOnlineMembers=$this->validation->set_checkbox('ShowOnlineMembers', '0');
		
	if($generalsettings['ShowOnlineGuests'])
		$ShowOnlineGuests=$this->validation->set_checkbox('ShowOnlineGuests', '1');
	else
		$ShowOnlineGuests=$this->validation->set_checkbox('ShowOnlineGuests', '0'); 
		
	if($generalsettings['ShowOnlineMemberNames'])
		$ShowOnlineMemberNames=$this->validation->set_checkbox('ShowOnlineMemberNames', '1');
	else
		$ShowOnlineMemberNames=$this->validation->set_checkbox('ShowOnlineMemberNames', '0');
		
	if($generalsettings['EnableCommentNotification'])
		$EnableCommentNotification=$this->validation->set_checkbox('EnableCommentNotification', '1');
	else
		$EnableCommentNotification=$this->validation->set_checkbox('EnableCommentNotification', '0');
		
	if($generalsettings['EnablePostScheduling'])
		$EnablePostScheduling=$this->validation->set_checkbox('EnablePostScheduling', '1');
	else
		$EnablePostScheduling=$this->validation->set_checkbox('EnablePostScheduling', '0'); 
		
	if($generalsettings['EnableUploadingFiles'])
		$EnableUploadingFiles=$this->validation->set_checkbox('EnableUploadingFiles', '1');
	else
		$EnableUploadingFiles=$this->validation->set_checkbox('EnableUploadingFiles', '0');
		
	if($generalsettings['EnableComments'])
		$EnableComments=$this->validation->set_checkbox('EnableComments', '1');
	else
		$EnableComments=$this->validation->set_checkbox('EnableComments', '0');
			
	if($generalsettings['EnablePlugins'])
		$EnablePlugins=$this->validation->set_checkbox('EnablePlugins', '1');
	else
		$EnablePlugins=$this->validation->set_checkbox('EnablePlugins', '0');
	
	if($generalsettings['EnableRegistration'])
		$EnableRegistration=$this->validation->set_checkbox('EnableRegistration', '1');
	else
		$EnableRegistration=$this->validation->set_checkbox('EnableRegistration', '0');
	
	if($generalsettings['EnableGuestComment'])
		$EnableGuestComment=$this->validation->set_checkbox('EnableGuestComment', '1');
	else
		$EnableGuestComment=$this->validation->set_checkbox('EnableGuestComment', '0');
	
	if($generalsettings['SendRegistrationMessage'])
		$SendRegistrationMessage=$this->validation->set_checkbox('SendRegistrationMessage', '1');
	else
		$SendRegistrationMessage=$this->validation->set_checkbox('SendRegistrationMessage', '0');
	*/
	?>
